import { NgModule } from '@angular/core'
import { QRCodeModule } from 'angularx-qrcode'

import { SharedModule } from '@shared'
import { TerminalNewComponent } from './new/new.component'
import { TerminalNewBaseComponent } from './new/base/base.component'
import { TerminalNewSystemComponent } from './new/system/system.component'
import { TerminalService } from './terminal.abstract.service'
import { TerminalStoreService } from './new/terminal-store.service'
import { TerminalAlinterService } from './terminal-alinter.service'
import { TerminalDetailComponent } from './detail/detail.component'
import { TerminalDetailTabSystemComponent } from './detail/tab-system/tab-system.component'
import { TerminalDetailTabTransactionComponent } from './detail/tab-transaction/tab-transaction.component'
import { TerminalNewTradeComponent } from './new/trade/trade.component'
import { TerminalRoutingModule } from './terminal-routing.module'
import { TerminalListComponent } from './list/list.component'
import { TerminalDetailTabReceiveCodeComponent } from './detail/tab-receive-code/tab-receive-code.component'
import { StoreService } from '../store/store.service';
import { StoreAlinterService } from '../store/store-alinter.service';
const COMPONENTS = [
  TerminalListComponent,
]
const COMPONENTS_NOROUNT = [
  TerminalNewComponent,
  TerminalNewBaseComponent,
  TerminalNewSystemComponent,
  TerminalNewTradeComponent,
  TerminalDetailComponent,
  TerminalDetailTabSystemComponent,
  TerminalDetailTabTransactionComponent,
  TerminalDetailTabReceiveCodeComponent,
]

@NgModule({
  imports: [
    SharedModule,
    TerminalRoutingModule,
    QRCodeModule
  ],
  declarations: [
    ...COMPONENTS,
    ...COMPONENTS_NOROUNT,
  ],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [
    { provide: StoreService, useClass: StoreAlinterService },
    { provide: TerminalService, useClass: TerminalAlinterService },
    TerminalStoreService
  ]
})
export class TerminalModule { }
